home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / editor / frexxed / fpl / searchcount.fpl < prev    next >
Text File  |  1995-07-18  |  550b  |  25 lines

  1. export int SearchCount()
  2. {
  3.   int BufferID=DuplicateEntry();
  4.   int foundcount=0;
  5.   int currentbuffer=GetBufferID();
  6.  
  7.   if (BufferID) {
  8.     CurrentBuffer(BufferID);
  9.     GotoLine(1, 0);
  10.     while (Search()>=0)
  11.       foundcount++;
  12.     CurrentBuffer(currentbuffer);
  13.     Kill(BufferID);
  14.     Request(joinstr("\"", ReadInfo("search_buffer"), "\" is found ",
  15.                     ltostr(foundcount), " times!"),
  16.             "SearchCount", "Understood!");
  17.   }
  18.  
  19. }
  20.  
  21. /* Assign "amiga control s" to the function */
  22.  
  23. AssignKey("SearchCount();", "amiga control s");
  24.  
  25.